Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not expose empty cipassword to API #364

Merged
merged 3 commits into from
Oct 3, 2024
Merged

Conversation

jay7x
Copy link
Contributor

@jay7x jay7x commented Sep 12, 2024

@Tinyblargon
Copy link
Collaborator

Tinyblargon commented Sep 12, 2024

@jay7x thank you for your contribution, could you add a test case to cement this behavior.

This is the test I'm referring to:

func Test_ConfigQemu_mapToAPI(t *testing.T) {

Can you add the test case in the following category:

{category: `CloudInit`, // Create CloudInit no need for update as update and create behave the same. will be changed in the future

Looking at it it's probably only a create case. If you want me to add the test case that's also possible.

@jay7x
Copy link
Contributor Author

jay7x commented Sep 13, 2024

I'll try to add it this weekend :)

@jay7x
Copy link
Contributor Author

jay7x commented Sep 30, 2024

Later is better than never! I added a case when cipassword should be deleted when set to an empty value. Not really sure it is meaningful at all, but it behaves the same as ciuser now.
@Tinyblargon let me know if you'd prefer to drop this latest behavior change or split the PR.

@Tinyblargon
Copy link
Collaborator

@jay7x I'll try to review it tomorrow. Setting the password to an empty string in the GUI also deletes it. Therefore, how you implement it is the correct behavior.

@Tinyblargon
Copy link
Collaborator

@jay7x everything looks good.

@Tinyblargon Tinyblargon merged commit 25d65da into Telmate:master Oct 3, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: A password is being set for the default cloud-init user when cipassword is not-defined or null
2 participants